---@class GT.ui.model.weather 天气
GT.ui.model.weather = class()





function GT.ui.model.weather:ctor()
    self.ui = {}
    self.prefab = {}
    self.prefab["天气"] = GT.ui.prefab.obj({
        module = "7392ac98-2cfe-4f3d-ac54-5060cdeb96fe",
        parent = "panel_2",
    })
    self.flushed={}

    local p = self.prefab["天气"]

    self.ui["self"] = p:child(GT.ui, "天气")
    self.ui["天气图标"] = p:child(GT.ui.control.image, "天气底板.天气图标")
    self.ui["天气名字"] = p:child(GT.ui.control.label, "天气名字")
    self.ui["游戏时间"] = p:child(GT.ui.control.label, "游戏时间")
    self.ui["运行时长"] = p:child(GT.ui.control.label, "运行时长底板.运行时长")
    
    tick.add(function (uuid)
        _,_,hour, minute = string.find(string.format("%.2f", GT.get_current_game_time()), "(%d+).(%d+)")
        self.ui["游戏时间"].binding.text=string.format("%02d:%02d",hour, minute)
        self.ui["运行时长"].binding.text= disp_time2(math.floor(GT.current_game_run_time())) 
    end)
end

---转对象
---@return GT.ui.model.weather
function GT.ui.model.weather.obj()
    return new(GT.ui.model.weather)
end



